package com.zxcl.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 描述: [商品检索对象]
 * 作者: zxcl
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("商品检索对象")
public class ProdEs {

    //保留这个产品id是因为这个时候用产品id去数据库中查询也很快，因为主键查询有加成
    @ApiModelProperty(value = "产品ID")
    private Long prodId;
    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    private String prodName;
    /**
     * 店铺id
     */
    @ApiModelProperty(value = "店铺id")
    private Long shopId;
    /**
     * 现价
     */
    @ApiModelProperty(value = "现价")
    private BigDecimal price;

    /**
     * 搜索出来最先看到的图片
     */
    @ApiModelProperty(value = "商品主图")
    private String pic;

    @ApiModelProperty(value = "商品分类")
    private Long categoryId;

    @ApiModelProperty(value = "销量")
    private Integer soldNum;

    /**
     * 参与的活动标签
     */
    @ApiModelProperty(value = "标签ids")
    private List<Long> tagList;

    /**
     * 好评的百分比
     */
    @ApiModelProperty(value = "好评率")
    private BigDecimal positiveRating = BigDecimal.ZERO;

    @ApiModelProperty(value = "好评数")
    private Long praiseNumber = 0L;

}
